package game.scene;

import game.components.Camera;
import game.players.SoccerPlayerCPUMate;
import game.players.SoccerPlayerCPUOpponent;
import game.players.SoccerPlayerUser;
import game.players.cpu.teammate.IdleCPUMate;
import game.players.goalkeeper.mate.GoalkeeperCPUMate;
import game.players.goalkeeper.opp.GoalkeeperCPUOpp;
import game.players.user.ServingUserPlayer;
import utils.Range;

public class PlayerServeScene extends MatchScene {	
	
	public PlayerServeScene(Camera camera, int playerScore, int enemyScore,	int minute, int second) {
		super(camera, playerScore, enemyScore, minute, second);
	}

	protected void setUpOpponents() {
		this.getOpponents().add(new GoalkeeperCPUOpp(1500,300,this.getRightArc()));
		this.getOpponents().add(new SoccerPlayerCPUOpponent(1000, 100, new Range(600, 1500), new Range(0, 250)));
		this.getOpponents().add(new SoccerPlayerCPUOpponent(1000, 400, new Range(400, 1400), new Range(250, 500)));
		this.getOpponents().add(new SoccerPlayerCPUOpponent(600, 0, new Range(-600, 650), new Range(-50, 250)));
		this.getOpponents().add(new SoccerPlayerCPUOpponent(600, 500, new Range(-500, 650), new Range(250, 550)));
		
		this.setOppenentsArc();
		
		this.getPlayers().addAll(this.getOpponents());
	}
	
	protected void setUpTeammates() {
		this.setUserPlayer(new SoccerPlayerUser(400, 250));
		this.getUserPlayer().setState(new ServingUserPlayer(this.getUserPlayer(), this.getSoccerBall()));
		this.getTeammates().add(this.getUserPlayer());
		this.getTeammates().add(new GoalkeeperCPUMate(-700,250,this.getLeftArc()));
		
		SoccerPlayerCPUMate defense1 = new SoccerPlayerCPUMate(-200, 0, new Range(-600, 600), new Range(0, 250));
		defense1.setState(new IdleCPUMate(defense1));
		this.getTeammates().add(defense1);
		
		SoccerPlayerCPUMate defense2 = new SoccerPlayerCPUMate(-200, 500, new Range(-650, 400), new Range(250, 500));
		defense2.setState(new IdleCPUMate(defense2));
		this.getTeammates().add(defense2);
		
		SoccerPlayerCPUMate serveMatePlayer = new SoccerPlayerCPUMate(400, 170, new Range(200, 1400), new Range(-50, 250));
		serveMatePlayer.setState(new IdleCPUMate(serveMatePlayer));
		this.getTeammates().add(serveMatePlayer);
		
		this.setTeammatesArc();
		
		this.getPlayers().addAll(this.getTeammates());
	}
}
